-- *****************************************************************
-- REDSTONE-ACCOUNTING-MIB
--
-- Redstone Communications Inc. Enterprise MIB
-- Accounting MIB
--
-- Copyright 1999 Redstone Communications, Incorporated.
-- All Rights Reserved.
--
-- This MIB augments the MIB specified in RFC2513 - Connection 
-- Oriented Accounting MIB.
-- *****************************************************************

REDSTONE-ACCOUNTING-MIB DEFINITIONS ::= BEGIN

IMPORTS
    Integer32, MODULE-IDENTITY, OBJECT-TYPE       FROM SNMPv2-SMI
    MODULE-COMPLIANCE, OBJECT-GROUP               FROM SNMPv2-CONF
    RowStatus                                     FROM SNMPv2-TC
    acctngSelectionEntry, acctngSelectionIndex, 
    acctngFileEntry                               FROM ACCOUNTING-CONTROL-MIB
    rsMgmt                                        FROM REDSTONE-SMI
    rsIfType                                      FROM REDSTONE-IF-MIB
    RsAcctngOperType, RsAcctngAdminType           FROM REDSTONE-TC;

rsAcctngMIB  MODULE-IDENTITY
        LAST-UPDATED "0011070000Z"
        ORGANIZATION "Redstone Communications, Inc."
        CONTACT-INFO
        "
        Redstone Communications, Inc.
                5 Carlisle Road
        Westford MA 01886
        USA
        Tel:    +1-978-692-1999
                Email:  mib@redstonecom.com
        "
        DESCRIPTION
          "Key revisions include:
            o  Added rsAcctngIfTimeOffset
          "
        REVISION "0007210000Z"
        DESCRIPTION
          "Key revisions include:
            o  Added rsAcctngIfCorrelator
            o  Added rsAcctngIfInPolicedOctets
            o  Added rsAcctngIfInPolicedPkts
            o  Added rsAcctngIfInSpoofedPkts
            o  Added rsAcctngIfOutPolicedOctets
            o  Added rsAcctngIfOutPolicedPkts
            o  Added rsAcctngIfOutSchedulerDropOctets
            o  Added rsAcctngIfOutSchedulerDropPkts
            o  Added rsAcctngIfLowerInterface
          "
        REVISION "0003200000Z"
        DESCRIPTION
          "Key revisions include:
            o  Moved rsAcctngSelectionMaxIfStackLevels
          "
        REVISION      "0002210000Z"
        DESCRIPTION
          "Key revisions include:
            o  Added rsAcctngSelectionMaxIfStackLevels
            o  Added rsAcctngSelectionIfStackStartTable
            o  Added rsAcctngSelectionSchemaIfStack
            o  Added rsAcctngSelectionSubtreeType
            o  Removed rsAcctngSelectionSchemaPpp
          "
        REVISION      "0001170000Z"
        DESCRIPTION
                "The accounting MIB for the
                Redstone Communications Inc. enterprise."
        REVISION      "9910180000Z"
        DESCRIPTION
                "Initial version of this MIB module."
    ::= { rsMgmt 24 }

-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- Textual conventions
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- MIB Structure 
--
-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

rsAcctngMIBObjects       OBJECT IDENTIFIER ::= { rsAcctngMIB 1 }

rsAcctngSelectionControl OBJECT IDENTIFIER ::= { rsAcctngMIBObjects 1 }
rsAcctngFileControl      OBJECT IDENTIFIER ::= { rsAcctngMIBObjects 2 }
rsAcctngInterfaceControl OBJECT IDENTIFIER ::= { rsAcctngMIBObjects 3 }

-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- MIB Objects
-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

-- The Accounting Information Selection table

rsAcctngSelectionTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF RsAcctngSelectionEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
            "A list of accounting information selection entries.

            Note that additions, modifications and deletions of entries
            in this table can occur at any time, but such changes only
            take effect on the next occasion when collection begins into
            a new interval. Thus, between modification and the next 'swap',
            the content of this table does not reflect the current
            selection."
    ::= { rsAcctngSelectionControl 1 }

rsAcctngSelectionEntry OBJECT-TYPE
    SYNTAX      RsAcctngSelectionEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
            "An entry used to extend the the selection entry in  
            acctngSelectionEntry.  This conceptual row extension is
            used for Redstone accounting extensions for connectionless
            data collection."  
    AUGMENTS   { acctngSelectionEntry }
    ::= { rsAcctngSelectionTable 1 }

RsAcctngSelectionEntry ::=
    SEQUENCE {
        rsAcctngSelectionType             BITS,
        rsAcctngSelectionMode             INTEGER,
        rsAcctngSelectionSubtreeType      INTEGER,
        rsAcctngSelectionMaxIfStackLevels INTEGER
    }

rsAcctngSelectionType OBJECT-TYPE
    SYNTAX      BITS { ietfAccountControl(0),
                       connectionLessLayer2(1) }
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
            "Indicates the types of connections for which the
            information selected by this entry are to be collected.
            The ietfAccountControl(0) bit position indicates that the
            acctngSelectionType in the base conceptual row determines
            the selection type.  All other bit positions for this object
            over-ride the acctngSelectionType in the base conceptual
            row." 
    ::= { rsAcctngSelectionEntry 1 }

rsAcctngSelectionMode OBJECT-TYPE
    SYNTAX      INTEGER { absoluteCounterValues(1),
                          deltaCounterValues(2) }
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
            "Indicates the data collection mode."
    DEFVAL { deltaCounterValues }
    ::= { rsAcctngSelectionEntry 2 }

rsAcctngSelectionSubtreeType OBJECT-TYPE
    SYNTAX      INTEGER { unknown(0),
                          lineCard(1),
                          systemController(2) }
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
            "Indicates the origin of the collection, given the row's subtree.
             The architecture implementation for statistics collection
             imposes that rows with distinct rsAcctngSelectionSubtreeType may not
             be collected into the same accounting file. Conversely, different
             files (configured from acctngSelectionFile) entries are necessary
             in order to collect from subtrees (configured from 
             acctngSelectionSubtree) that imply into different subtree types
             (rsAcctngSelectionSubtreeType)."
    ::= { rsAcctngSelectionEntry 3 }

rsAcctngSelectionMaxIfStackLevels OBJECT-TYPE
    SYNTAX      INTEGER
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
            "Indicates the maximum number of levels in the ifStack
            table to be returned when using the ifStack accounting
            schema. This object is ignored if acctngSelectionSubtree
            is not set to rsAcctngSelectionSchemaIfStack.
            When this object is zero, the entire stack above
            the starting point(s) given will be returned. When this
            object is set to 1, only ifIndexes stacked above the 
            starting point(s) given will be returned."
    DEFVAL { 0 }
    ::= { rsAcctngSelectionEntry 4 }

-- The Accounting Information ifStack Selection

rsAcctngSelectionIfStackStartTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF RsAcctngSelectionIfStackStartEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
            "A list of ifIndexes to be used as starting point when
            using the ifStack selection schema.

            Note that additions, modifications and deletions of entries
            in this table can occur at any time, but such changes only
            take effect on the next occasion when collection begins into
            a new interval.  Thus, between modification and the next 
            'swap', the content of this table does not reflect the
            current selection."
    ::= { rsAcctngSelectionControl 3 }

rsAcctngSelectionIfStackStartEntry OBJECT-TYPE
    SYNTAX      RsAcctngSelectionIfStackStartEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
            "An entry used to determine the starting point entry when
            using the ifStack schema."
    INDEX { acctngSelectionIndex, rsAcctngSelectionIfStackIfIndex }
    ::= { rsAcctngSelectionIfStackStartTable 1 }

RsAcctngSelectionIfStackStartEntry ::=
    SEQUENCE {
        rsAcctngSelectionIfStackIfIndex    Integer32,
        rsAcctngSelectionIfStackRowStatus  RowStatus
    }

rsAcctngSelectionIfStackIfIndex OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
            "The ifIndex to be used as a starting point in the
            interface stack configuration. The interfaces to be
            returned in the ifStack schema will start from this
            value, going up."
    ::= { rsAcctngSelectionIfStackStartEntry 1 }

rsAcctngSelectionIfStackRowStatus OBJECT-TYPE
    SYNTAX      RowStatus
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
            "Controls creation/deletion of entries in this table."
    ::= { rsAcctngSelectionIfStackStartEntry 2 }

-- The Accounting File Table

rsAcctngFileTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF RsAcctngFileEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
            "A unique value identifying the file transfer behavior 
            and the the file to where accounting data is to be stored."
    ::= { rsAcctngFileControl 1 }

rsAcctngFileEntry OBJECT-TYPE
    SYNTAX      RsAcctngFileEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
            "An entry used to extend the file management of   
            acctngFileEntry.  This conceptual row extension is
            used for Redstone accounting extensions to automate
            the transfer of accounting data to remote hosts."
    AUGMENTS   { acctngFileEntry }
    ::= { rsAcctngFileTable 1 }

RsAcctngFileEntry ::=
    SEQUENCE {
        rsAcctngFileXferMode            INTEGER,
        rsAcctngFileXferIndex           INTEGER,
        rsAcctngFileXferSecondaryIndex  INTEGER
    }

rsAcctngFileXferMode OBJECT-TYPE
    SYNTAX    INTEGER   { rsAcctngManualTransfer(1),
                          rsAcctngAutomatedTransfer(2),
                          rsAcctngTransferOnFileFull(3),
                          rsAcctngRedundantTransfer(4) }
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "Indicates the mode to use for transfering accounting
        data to remote client.

        rsAcctngManualTransfer
        Administrator is responsible for manually transfering
        collected accounting data off of the system.

        rsAcctngAutomatedTransfer
        The agent will automatically transfer the collected
        accounting data based at a acctngFileIntervals
        using an entry in the rsFileXferTable pointed to by
        rsAcctngFileXferIndex. If a manager sets this object
        to this value, a corresponding row in the rsFileXferTable
        must exist, otherwise the set command will fail.

        rsActngTransferOnFileFull
        The agent will automatically transfer the collected
        accounting data when the file reaches the maximum
        size defined by acctngFileMaximumSize.  If a manager sets
        this object to this value, a corresponding row in the
        rsFileXferTable must exist, otherwise the set command
        will fail.

        rsAcctngRedundantTransfer
        The agent will automatically transfer two copies of the 
        accounting data based on the acctngFileInterval.
        One copy will go to the rsFileXferTable entry identified
        by rsAcctngFileXferIndex and one copy will go the the
        rsFileXferTable entry identified by rsAcctngFileXferSecondaryIndex" 
    DEFVAL {rsAcctngManualTransfer }     
    ::= { rsAcctngFileEntry 1 }

rsAcctngFileXferIndex OBJECT-TYPE
    SYNTAX      INTEGER 
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
         "Identifies an entry in the rsFileXferTable, which defines
         the file transfer parameters to use when the agent is
         configured to automatically transfer collected accounting
         data files. A set to this object will fail if a corresponding
         entry in the rsFileXferTable does not exist or it is not
         set to rsFileXferAcctngStatistics. " 
    ::= { rsAcctngFileEntry 2 }

rsAcctngFileXferSecondaryIndex OBJECT-TYPE
    SYNTAX      INTEGER 
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
         "Identifies a backup or secondary entry in the rsFileXferTable,
         which defines the file transfer parameters to use when the agent is
         configured to automatically transfer collected accounting
         data files. A set to this object will fail if a corresponding
         entry in the rsFileXferTable does not exist or it is not
         set to rsFileXferAcctngStatistics."
    ::= { rsAcctngFileEntry 3 }
--  Per-interface Type Control Table

rsAcctngInterfaceTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF RsAcctngInterfaceEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
            "A table controlling the collection of accounting data on
            specific interfaces types.  This table provides an efficient
            mechanism to enable and/or disable data collection on
            all interfaces of a specified type."
    ::= { rsAcctngInterfaceControl 1 }

rsAcctngInterfaceEntry OBJECT-TYPE
    SYNTAX      RsAcctngInterfaceEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
            "An entry which controls whether accounting data is to be
            collected on interfaces of a specific type." 
    INDEX   { rsIfType }
    ::= { rsAcctngInterfaceTable 1 }

RsAcctngInterfaceEntry ::=
    SEQUENCE {
        rsAcctngInterfaceAdminStatus     RsAcctngAdminType, 
        rsAcctngInterfaceOperStatus      RsAcctngOperType,
        rsAcctngInterfaceRowStatus       RowStatus,
        rsAcctngInterfaceAccntgFileIndex INTEGER
    }

rsAcctngInterfaceAdminStatus OBJECT-TYPE
    SYNTAX      RsAcctngAdminType 
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
            "The desired administrative state for accounting data
            collection for interfaces defined by the type of this entry.
            The administrative scope is for all interfaces of the type
            defined by the corresponding rsIfType for this entry."
    ::= { rsAcctngInterfaceEntry 1 }

rsAcctngInterfaceOperStatus OBJECT-TYPE
    SYNTAX      RsAcctngOperType 
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
             "The operational state for accounting data collection
             on for all interfaces corresponding to this entries type."
    ::= { rsAcctngInterfaceEntry 2 }

rsAcctngInterfaceRowStatus OBJECT-TYPE
    SYNTAX      RowStatus
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
             "Controls creation/deletion of entries in this table."
    ::= { rsAcctngInterfaceEntry 3 }

rsAcctngInterfaceAccntgFileIndex OBJECT-TYPE
    SYNTAX      INTEGER 
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
             "This object selects the acctngFileTable entry for the
             collection statistics for this interface type.  If there is
             not an entry in the acctngFileTable with the index indicated
             by this object, the rsAcctngInterface row will be ignored,
             unless the following conditions are met: 
             (1) rsAcctngInterfaceAccntgFileIndex is set to zero, which
             is its default value, and (2) there is only one entry in the 
             acctngFileTable. When the two conditions are met, the 
             interface type will apply to the one existing acctngFileTable
             entry."
    DEFVAL { 0 }
    ::= { rsAcctngInterfaceEntry 4 }

-- enterprise schema information

rsAcctngSelectionSchema OBJECT-IDENTITY
        STATUS  current
        DESCRIPTION
             "The root OBJECT IDENTIFIER under which accounting selection tree
             objects are assigned."
        ::= { rsAcctngMIB 2 }


rsAcctngSelectionSchemaIf  OBJECT IDENTIFIER ::= { rsAcctngSelectionSchema 1 }

rsAcctngIfInOctets               OBJECT IDENTIFIER ::= { rsAcctngSelectionSchemaIf 1 }
rsAcctngIfInUcastPkts            OBJECT IDENTIFIER ::= { rsAcctngSelectionSchemaIf 2 }
rsAcctngIfInDiscards             OBJECT IDENTIFIER ::= { rsAcctngSelectionSchemaIf 3 }
rsAcctngIfInErrors               OBJECT IDENTIFIER ::= { rsAcctngSelectionSchemaIf 4 }
rsAcctngIfInUnknownProtos        OBJECT IDENTIFIER ::= { rsAcctngSelectionSchemaIf 5 }
rsAcctngIfOutOctets              OBJECT IDENTIFIER ::= { rsAcctngSelectionSchemaIf 6 }
rsAcctngIfOutUcastPkts           OBJECT IDENTIFIER ::= { rsAcctngSelectionSchemaIf 7 }
rsAcctngIfOutDiscards            OBJECT IDENTIFIER ::= { rsAcctngSelectionSchemaIf 8 }
rsAcctngIfOutErrors              OBJECT IDENTIFIER ::= { rsAcctngSelectionSchemaIf 9 }
rsAcctngIfCorrelator             OBJECT IDENTIFIER ::= { rsAcctngSelectionSchemaIf 10 }
rsAcctngIfInPolicedOctets        OBJECT IDENTIFIER ::= { rsAcctngSelectionSchemaIf 11 }
rsAcctngIfInPolicedPkts          OBJECT IDENTIFIER ::= { rsAcctngSelectionSchemaIf 12 }
rsAcctngIfInSpoofedPkts          OBJECT IDENTIFIER ::= { rsAcctngSelectionSchemaIf 13 }
rsAcctngIfOutPolicedOctets       OBJECT IDENTIFIER ::= { rsAcctngSelectionSchemaIf 14 }
rsAcctngIfOutPolicedPkts         OBJECT IDENTIFIER ::= { rsAcctngSelectionSchemaIf 15 }
rsAcctngIfOutSchedulerDropOctets OBJECT IDENTIFIER ::= { rsAcctngSelectionSchemaIf 16 }
rsAcctngIfOutSchedulerDropPkts   OBJECT IDENTIFIER ::= { rsAcctngSelectionSchemaIf 17 }
rsAcctngIfLowerInterface         OBJECT IDENTIFIER ::= { rsAcctngSelectionSchemaIf 18 }
rsAcctngIfTimeOffset             OBJECT IDENTIFIER ::= { rsAcctngSelectionSchemaIf 19 }

rsAcctngSelectionSchemaIfStack   OBJECT IDENTIFIER ::= { rsAcctngSelectionSchema 3 }

-- conformance information

rsAcctngConformance OBJECT IDENTIFIER ::= { rsAcctngMIB 3 }
rsAcctngGroups      OBJECT IDENTIFIER ::= { rsAcctngConformance 1 }
rsAcctngCompliances OBJECT IDENTIFIER ::= { rsAcctngConformance 2 }

rsAcctngCompliance MODULE-COMPLIANCE
    STATUS  current
    DESCRIPTION
            "The compliance statement for switches which implement the
            RedStone Accounting Control MIB."
    MODULE  -- this module
        MANDATORY-GROUPS { rsAcctngBasicGroup }

        OBJECT      rsAcctngSelectionType
        MIN-ACCESS  read-only
        DESCRIPTION "Write access is required.  When the value of this
                     object over-rides the the acctngSelectionType in
                     the IETF accountingControlMIB, the following objects
                     in that MIB has no meaning: 
                      
                         acctngFileCollectFailedAttempts
                         acctngFileMinAge

                     because they control or are related to connection
                     oriented accounting." 
    ::= { rsAcctngCompliances 1 }


-- units of conformance

rsAcctngBasicGroup    OBJECT-GROUP
    OBJECTS { rsAcctngSelectionType,
              rsAcctngSelectionMode,
              rsAcctngFileXferMode,
              rsAcctngFileXferIndex,
              rsAcctngInterfaceAdminStatus,
              rsAcctngInterfaceOperStatus }
    STATUS  current
    DESCRIPTION
            "A collection of objects providing control of the basic
            collection of accounting data for connection-less
            networks."
    ::= { rsAcctngGroups 1 }

END